// 工序分类数据接口
export interface ProcessCategory {
  id: number
  processCategoryNumber: string
  processCategoryName: string
  sortOrder: number
  isActive: boolean
  remarks: string
  processCount: number
  createTime: string
  creator: string
  updateTime: string
  updator: string
}

// 工序分类分页查询参数
export interface ProcessCategoryPageParams {
  NumberOrName?: string
  pageIndex?: number
  pageSize?: number
}

// 工序分类分页响应数据
export interface ProcessCategoryPageResponse {
  totaCount: number   // 匹配后端返回的字段名（缺少l）
  totaPage: number    // 匹配后端返回的字段名（缺少l）
  pageData: ProcessCategory[]
}

// API响应基础结构，包含直接的分页字段
export interface ProcessCategoryApiResponse {
  code: number
  msg: string
  data: any
  pageData: ProcessCategory[]  // 分页数据直接在根级别
  totaCount: number           // 总数量直接在根级别（匹配后端字段名）
  totaPage: number           // 总页数直接在根级别（匹配后端字段名）
}

// 工序分类创建DTO
export interface ProcessCategoryCreateDto {
  processCategoryNumber: string
  processCategoryName: string
  sortOrder: number
  isActive: boolean
  remarks?: string
}

// 工序分类更新DTO
export interface ProcessCategoryUpdateDto {
  id: number
  processCategoryNumber: string
  processCategoryName: string
  sortOrder: number
  isActive: boolean
  remarks?: string
}

// 工序数据接口
export interface Process {
  id: number
  processNumber: string
  processName: string
  processCategoryId: number
  processCategoryName: string
  department?: string
  responsiblePerson?: string
  isActive: boolean
  remarks?: string
  attachmentFileName?: string
  createdBy?: string
  createdTime: string
  updatedBy?: string
  updatedTime?: string
}

// 工序查询参数
export interface ProcessQueryParams {
  NumberOrName?: string
  ProcessCategoryId?: number
  Department?: string
  ResponsiblePerson?: string
  IsActive?: boolean
  pageIndex?: number
  pageSize?: number
}

// 工序创建DTO
export interface ProcessCreateDto {
  processNumber: string
  processName: string
  processCategoryId: number
  department?: string
  responsiblePerson?: string
  isActive: boolean
  remarks?: string
}

// 工序更新DTO
export interface ProcessUpdateDto {
  id: number
  processNumber: string
  processName: string
  processCategoryId: number
  department?: string
  responsiblePerson?: string
  isActive: boolean
  remarks?: string
}

// 工序分页响应数据
export interface ProcessPageResponse {
  totaCount: number
  totaPage: number
  pageData: Process[]
}

// 工序API响应结构
export interface ProcessApiResponse {
  code: number
  msg: string
  data: any
  pageData: Process[]
  totaCount: number
  totaPage: number
} 

// 工艺流程数据接口
export interface ProcessFlow {
  id: number
  processFlowNumber: string
  processFlowName: string
  processCount: number
  responsiblePerson?: string
  department?: string
  isActive: boolean
  remarks?: string
  attachmentOriginalFileName?: string
  attachmentStoredFileName?: string
  attachmentFilePath?: string
  attachmentFileSize?: number
  attachmentContentType?: string
  attachmentRemarks?: string
  createdTime: string
  updatedTime: string
  processSteps?: ProcessFlowStep[]
}

// 工艺流程步骤接口
export interface ProcessFlowStep {
  id: number
  stepOrder: number
  processFlowId: number
  processId: number
  processNumber: string
  processName: string
  processCategoryName: string
  responsiblePerson?: string
  department?: string
  stepRemarks?: string
  processRemarks?: string
}

// 工艺流程查询参数
export interface ProcessFlowQueryParams {
  NumberOrName?: string
  Department?: string
  ResponsiblePerson?: string
  IsActive?: boolean
  pageIndex?: number
  pageSize?: number
}

// 工艺流程创建DTO
export interface ProcessFlowCreateDto {
  processFlowNumber: string
  processFlowName: string
  responsiblePerson?: string
  department?: string
  isActive: boolean
  remarks?: string
}

// 工艺流程更新DTO
export interface ProcessFlowUpdateDto {
  id: number
  processFlowNumber: string
  processFlowName: string
  responsiblePerson?: string
  department?: string
  isActive: boolean
  remarks?: string
}

// 工艺流程API响应结构
export interface ProcessFlowApiResponse {
  code: number
  msg: string
  data: any
  pageData: ProcessFlow[]
  totaCount: number
  totaPage: number
} 